package cn.jiyun.controller;

import cn.jiyun.dao.login.Login;
import cn.jiyun.dao.login.LoginDTO;
import cn.jiyun.dao.login.Team;
import cn.jiyun.feign.LoginFeign;
import cn.jiyun.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Author 王晨
 * Date 2023/8/22
 */
@RestController
@RequestMapping("/enter")
public class LoginController {
    @Autowired
    private LoginFeign loginFeign;

    @RequestMapping("denl")
    public R denl(@RequestBody Login login){
        return loginFeign.login(login);
    }

    @RequestMapping("/findLogin")
    public R findLogin(LoginDTO loginDTO){
        return loginFeign.findLogin(loginDTO);
    }

    @RequestMapping("/add")
    public R add(Team team){
        return loginFeign.add(team);

    }


}
